package jpa.entitys.synchro.staging;

import java.io.Serializable;
import java.math.BigDecimal;

import javax.persistence.*;

import java.util.Date;


/**
 * The persistent class for the MM_PURCHASE_ORDERS database table.
 * 
 */
@Entity
@Table(name="MM_PURCHASE_ORDERS")
@NamedQueries({
    @NamedQuery(name = "MmPurchaseOrder.findAll", query = " SELECT c FROM MmPurchaseOrder c "),
    @NamedQuery(name = "MmPurchaseOrder.findById", query = " SELECT c FROM MmPurchaseOrder c WHERE c.promisStagingId = :Id "),
    @NamedQuery(name = "MmPurchaseOrder.findAllIsSync", query = " SELECT c FROM MmPurchaseOrder c Where c.issync = :issync Order by c.instanceNo asc"),
    @NamedQuery(name = "MmPurchaseOrder.findSapPoDoc", query = " SELECT c FROM MmPurchaseOrder c Where c.issync = :issync And c.instanceNo = :instanceNo And c.poStatus = :poStatus And c.extRefNo = :extRefNo Order by c.instanceNo, c.seqNo asc"),
    @NamedQuery(name = "MmPurchaseOrder.findByInstanceNo", query = " SELECT c FROM MmPurchaseOrder c WHERE c.instanceNo = :instanceNo ")
    })
public class MmPurchaseOrder extends jpa.entitys.synchro.common.CommonEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="PROMIS_STAGING_ID")
	private String promisStagingId;
	
	@Override public String toString() { return org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(this);}

	private String company;

	@Column(name="CREATED_BY")
	private String createdBy;

	private String currency;

	@Column(name="DEPARTMENT_CODE")
	private String departmentCode;

	@Column(name="DETAIL_ID")
	private String detailId;

	@Column(name="DISCOUNT_AMOUNT_FC")
	private String discountAmountFc;

	@Column(name="DISCOUNT_PERCENT")
	private String discountPercent;

	@Column(name="EXCHANGE_RATE")
	private String exchangeRate;

	@Column(name="EXT_REF_KEY")
	private String extRefKey;

	@Column(name="EXT_REF_NO")
	private String extRefNo;

	@Column(name="ITEM_CODE")
	private String itemCode;

	@Column(name="ITEM_DESC")
	private String itemDesc;

	@Column(name="ITEM_RATE")
	private String itemRate;

	@Column(name="ITEM_UM")
	private String itemUm;

	@Column(name="ITEM_UM_QTY")
	private String itemUmQty;

	@Column(name="MSG_ACT_RESULT")
	private String msgActResult;

	@Column(name="MSG_ALT_DESC")
	private String msgAltDesc;

	@Column(name="MSG_CODE")
	private String msgCode;

	@Column(name="MSG_DESC")
	private String msgDesc;

	@Column(name="NET_AMOUNT_LC")
	private String netAmountLc;

	@Column(name="PO_DATE")
	private String poDate;

	@Column(name="PO_DISCOUNT_PERCENT")
	private String poDiscountPercent;

	@Column(name="PO_NO")
	private String poNo;

	@Column(name="PO_SERIES")
	private String poSeries;

	@Column(name="PO_TYPE")
	private String poType;

	@Column(name="PR_NO")
	private String prNo;

	@Column(name="REF_PR_LINE_SEQ")
	private String refPrLineSeq;

	@Column(name="SAP_COMPANY_CODE")
	private String sapCompanyCode;

	@Column(name="SAP_PLANT_CODE")
	private String sapPlantCode;

	@Column(name="SEQ_NO")
	private BigDecimal seqNo;

	@Column(name="SYNC_CREATEDBY")
	private String syncCreatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_CREATEDON")
	private Date syncCreatedon;

	@Column(name="ISSYNC")
	private String issync;

	@Column(name="SYNC_UPDATEDBY")
	private String syncUpdatedby;

    @Temporal( TemporalType.TIMESTAMP)
	@Column(name="SYNC_UPDATEDON")
	private Date syncUpdatedon;

	@Column(name="UNIT_NUMBER")
	private String unitNumber;

	@Column(name="UPDATED_BY")
	private String updatedBy;

	@Column(name="UPDATED_ON")
	private String updatedOn;

	@Column(name="VAT_AMOUNT_LC")
	private String vatAmountLc;

	@Column(name="VAT_BASE_AMOUNT_LC")
	private String vatBaseAmountLc;

	@Column(name="VAT_PERCENT")
	private String vatPercent;
	
	@Column(name="INSTANCE_NO")
	private String instanceNo;
	
	@Column(length=1)
	private String isactive;
	
	@Column(name="CREATED_ON")
	private String createdOn;
	
	@Column(name="PO_STATUS")
	private String poStatus;
	
	@Column(name="ACTION_HANDLER", length=20)
	private String actionHandle;
	
	@Column(name="SUPPLIER_CODE", length=30)
	private String supplierCode;
	
	@Column(name="ITEM_VALUE_FC", length=30)
	private String itemValueFc;
	
	@Column(name="DISCOUNT_AMOUNT", length=30)
	private String discountAmount;
	
	@Column(name="PO_ITEM_PRICE", length=30)
	private String poItemPrice;
	
	@Column(name="PO_DISCOUNT_AMOUNT", length=30)
	private String poDiscountAmount;
	
	@Column(name="PO_NET_ITEM_PRICE_LC", length=30)
	private String poNetItemPriceLc;
	
	@Column(name="PO_VAT_AMOUNT_LC", length=30)
	private String poVatAmountLc;
	
	@Column(name="VAT_INCLUDE_FLAG", length=1)
	private String vatIncludeFlag;
	
	@Column(name="PO_DELIVERYDATE", length=20)
	private String poDeliveryDate;
	
	@Column(name="STATUS")
	private String status;
	
	@Column(name="INTERFACE_NO", length=100)
	private String interfaceNo;
	
	@Column(name="TAX_TYPE", length=100)
	private String taxType;
	
	@Column(name="ADJUST_FLAG", length=100)
	private String adjustFlag;
	
	@Column(name="ADJUST_PO_QTY", length=100)
	private String adjustPoQty;
	
	@Column(name="PO_LINE_STATUS", length=100)
	private String poLineStatus;	
	
	@Column(name="RETU_PMSPO_COMPANY", length=100)
	private String retuPmsPoCompany;
	
	@Column(name="RETU_PMSPO_PROJECT", length=100)
	private String retuPmsPoProject;
	
	@Column(name="RETU_PMSPO_TYPE", length=100)
	private String retuPmsPoType;
	
	@Column(name="RETU_PMSPO_SERIES", length=100)
	private String retuPmsPoSeries;
	
	@Column(name="RETU_PMSPO_NO")
	private long retuPmsPoNo;
	
	@Column(name="RETU_PMSPO_REVISION_NO")
	private long retuPmsPoRevisionNo;
		 
	@Column(name="RETU_PMSPO_PO_DOC_NO", length=200)
	private String retuPmsPoPoDocNo;	
	
    public String getRetuPmsPoCompany() {
		return retuPmsPoCompany;
	}

	public void setRetuPmsPoCompany(String retuPmsPoCompany) {
		this.retuPmsPoCompany = retuPmsPoCompany;
	}

	public String getRetuPmsPoProject() {
		return retuPmsPoProject;
	}

	public void setRetuPmsPoProject(String retuPmsPoProject) {
		this.retuPmsPoProject = retuPmsPoProject;
	}

	public String getRetuPmsPoType() {
		return retuPmsPoType;
	}

	public void setRetuPmsPoType(String retuPmsPoType) {
		this.retuPmsPoType = retuPmsPoType;
	}

	public String getRetuPmsPoSeries() {
		return retuPmsPoSeries;
	}

	public void setRetuPmsPoSeries(String retuPmsPoSeries) {
		this.retuPmsPoSeries = retuPmsPoSeries;
	}

	public long getRetuPmsPoNo() {
		return retuPmsPoNo;
	}

	public void setRetuPmsPoNo(long retuPmsPoNo) {
		this.retuPmsPoNo = retuPmsPoNo;
	}

	public long getRetuPmsPoRevisionNo() {
		return retuPmsPoRevisionNo;
	}

	public void setRetuPmsPoRevisionNo(long retuPmsPoRevisionNo) {
		this.retuPmsPoRevisionNo = retuPmsPoRevisionNo;
	}

	public String getRetuPmsPoPoDocNo() {
		return retuPmsPoPoDocNo;
	}

	public void setRetuPmsPoPoDocNo(String retuPmsPoPoDocNo) {
		this.retuPmsPoPoDocNo = retuPmsPoPoDocNo;
	}

	/**
	 * @return the poLineStatus
	 */
	public String getPoLineStatus() {
		return poLineStatus;
	}

	/**
	 * @param poLineStatus the poLineStatus to set
	 */
	public void setPoLineStatus(String poLineStatus) {
		this.poLineStatus = poLineStatus;
	}

	/**
	 * @return the adjustPoQty
	 */
	public String getAdjustPoQty() {
		return adjustPoQty;
	}

	/**
	 * @param adjustPoQty the adjustPoQty to set
	 */
	public void setAdjustPoQty(String adjustPoQty) {
		this.adjustPoQty = adjustPoQty;
	}

	/**
	 * @return the adjustFlag
	 */
	public String getAdjustFlag() {
		return adjustFlag;
	}

	/**
	 * @param adjustFlag the adjustFlag to set
	 */
	public void setAdjustFlag(String adjustFlag) {
		this.adjustFlag = adjustFlag;
	}

	/**
	 * @return the taxType
	 */
	public String getTaxType() {
		return taxType;
	}

	/**
	 * @param taxType the taxType to set
	 */
	public void setTaxType(String taxType) {
		this.taxType = taxType;
	}

	/**
	 * @return the interfaceNo
	 */
	public String getInterfaceNo() {
		return interfaceNo;
	}

	/**
	 * @param interfaceNo the interfaceNo to set
	 */
	public void setInterfaceNo(String interfaceNo) {
		this.interfaceNo = interfaceNo;
	}
	
	/**
	 * @return the status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * @param status the status to set
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * @return the poDeliveryDate
	 */
	public String getPoDeliveryDate() {
		return poDeliveryDate;
	}

	/**
	 * @param poDeliveryDate the poDeliveryDate to set
	 */
	public void setPoDeliveryDate(String poDeliveryDate) {
		this.poDeliveryDate = poDeliveryDate;
	}

	/**
	 * @return the vatIncludeFlag
	 */
	public String getVatIncludeFlag() {
		return vatIncludeFlag;
	}

	/**
	 * @param vatIncludeFlag the vatIncludeFlag to set
	 */
	public void setVatIncludeFlag(String vatIncludeFlag) {
		this.vatIncludeFlag = vatIncludeFlag;
	}

	/**
	 * @return the poItemPrice
	 */
	public String getPoItemPrice() {
		return poItemPrice;
	}

	/**
	 * @param poItemPrice the poItemPrice to set
	 */
	public void setPoItemPrice(String poItemPrice) {
		this.poItemPrice = poItemPrice;
	}

	/**
	 * @return the poDiscountAmount
	 */
	public String getPoDiscountAmount() {
		return poDiscountAmount;
	}

	/**
	 * @param poDiscountAmount the poDiscountAmount to set
	 */
	public void setPoDiscountAmount(String poDiscountAmount) {
		this.poDiscountAmount = poDiscountAmount;
	}

	/**
	 * @return the poNetItemPriceLc
	 */
	public String getPoNetItemPriceLc() {
		return poNetItemPriceLc;
	}

	/**
	 * @param poNetItemPriceLc the poNetItemPriceLc to set
	 */
	public void setPoNetItemPriceLc(String poNetItemPriceLc) {
		this.poNetItemPriceLc = poNetItemPriceLc;
	}

	/**
	 * @return the poVatAmountLc
	 */
	public String getPoVatAmountLc() {
		return poVatAmountLc;
	}

	/**
	 * @param poVatAmountLc the poVatAmountLc to set
	 */
	public void setPoVatAmountLc(String poVatAmountLc) {
		this.poVatAmountLc = poVatAmountLc;
	}

	/**
	 * @return the supplierCode
	 */
	public String getSupplierCode() {
		return supplierCode;
	}

	/**
	 * @param supplierCode the supplierCode to set
	 */
	public void setSupplierCode(String supplierCode) {
		this.supplierCode = supplierCode;
	}

	/**
	 * @return the itemValueFc
	 */
	public String getItemValueFc() {
		return itemValueFc;
	}

	/**
	 * @param itemValueFc the itemValueFc to set
	 */
	public void setItemValueFc(String itemValueFc) {
		this.itemValueFc = itemValueFc;
	}

	/**
	 * @return the discountAmount
	 */
	public String getDiscountAmount() {
		return discountAmount;
	}

	/**
	 * @param discountAmount the discountAmount to set
	 */
	public void setDiscountAmount(String discountAmount) {
		this.discountAmount = discountAmount;
	}

	/**
	 * @return the poStatus
	 */
	public String getPoStatus() {
		return poStatus;
	}

	/**
	 * @param poStatus the poStatus to set
	 */
	public void setPoStatus(String poStatus) {
		this.poStatus = poStatus;
	}

	/**
	 * @return the actionHandle
	 */
	public String getActionHandle() {
		return actionHandle;
	}

	/**
	 * @param actionHandle the actionHandle to set
	 */
	public void setActionHandle(String actionHandle) {
		this.actionHandle = actionHandle;
	}

	/**
	 * @return the createdOn
	 */
	public String getCreatedOn() {
		return createdOn;
	}

	/**
	 * @param createdOn the createdOn to set
	 */
	public void setCreatedOn(String createdOn) {
		this.createdOn = createdOn;
	}

	/**
	 * @return the issync
	 */
	public String getIssync() {
		return issync;
	}

	/**
	 * @param issync the issync to set
	 */
	public void setIssync(String issync) {
		this.issync = issync;
	}

	/**
	 * @return the instanceNo
	 */
	public String getInstanceNo() {
		return instanceNo;
	}

	/**
	 * @param instanceNo the instanceNo to set
	 */
	public void setInstanceNo(String instanceNo) {
		this.instanceNo = instanceNo;
	}

	/**
	 * @return the isactive
	 */
	public String getIsactive() {
		return isactive;
	}

	/**
	 * @param isactive the isactive to set
	 */
	public void setIsactive(String isactive) {
		this.isactive = isactive;
	}

	public MmPurchaseOrder() {
    }

	public String getPromisStagingId() {
		return this.promisStagingId;
	}

	public void setPromisStagingId(String promisStagingId) {
		this.promisStagingId = promisStagingId;
	}

	public String getCompany() {
		return this.company;
	}

	public void setCompany(String company) {
		this.company = company;
	}

	public String getCreatedBy() {
		return this.createdBy;
	}

	public void setCreatedBy(String createdBy) {
		this.createdBy = createdBy;
	}

	public String getCurrency() {
		return this.currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public String getDepartmentCode() {
		return this.departmentCode;
	}

	public void setDepartmentCode(String departmentCode) {
		this.departmentCode = departmentCode;
	}

	public String getDetailId() {
		return this.detailId;
	}

	public void setDetailId(String detailId) {
		this.detailId = detailId;
	}

	public String getDiscountAmountFc() {
		return this.discountAmountFc;
	}

	public void setDiscountAmountFc(String discountAmountFc) {
		this.discountAmountFc = discountAmountFc;
	}

	public String getDiscountPercent() {
		return this.discountPercent;
	}

	public void setDiscountPercent(String discountPercent) {
		this.discountPercent = discountPercent;
	}

	public String getExchangeRate() {
		return this.exchangeRate;
	}

	public void setExchangeRate(String exchangeRate) {
		this.exchangeRate = exchangeRate;
	}

	public String getExtRefKey() {
		return this.extRefKey;
	}

	public void setExtRefKey(String extRefKey) {
		this.extRefKey = extRefKey;
	}

	public String getExtRefNo() {
		return this.extRefNo;
	}

	public void setExtRefNo(String extRefNo) {
		this.extRefNo = extRefNo;
	}

	public String getItemCode() {
		return this.itemCode;
	}

	public void setItemCode(String itemCode) {
		this.itemCode = itemCode;
	}

	public String getItemDesc() {
		return this.itemDesc;
	}

	public void setItemDesc(String itemDesc) {
		this.itemDesc = itemDesc;
	}

	public String getItemRate() {
		return this.itemRate;
	}

	public void setItemRate(String itemRate) {
		this.itemRate = itemRate;
	}

	public String getItemUm() {
		return this.itemUm;
	}

	public void setItemUm(String itemUm) {
		this.itemUm = itemUm;
	}

	public String getItemUmQty() {
		return this.itemUmQty;
	}

	public void setItemUmQty(String itemUmQty) {
		this.itemUmQty = itemUmQty;
	}

	public String getMsgActResult() {
		return this.msgActResult;
	}

	public void setMsgActResult(String msgActResult) {
		this.msgActResult = msgActResult;
	}

	public String getMsgAltDesc() {
		return this.msgAltDesc;
	}

	public void setMsgAltDesc(String msgAltDesc) {
		this.msgAltDesc = msgAltDesc;
	}

	public String getMsgCode() {
		return this.msgCode;
	}

	public void setMsgCode(String msgCode) {
		this.msgCode = msgCode;
	}

	public String getMsgDesc() {
		return this.msgDesc;
	}

	public void setMsgDesc(String msgDesc) {
		this.msgDesc = msgDesc;
	}

	public String getNetAmountLc() {
		return this.netAmountLc;
	}

	public void setNetAmountLc(String netAmountLc) {
		this.netAmountLc = netAmountLc;
	}

	public String getPoDate() {
		return this.poDate;
	}

	public void setPoDate(String poDate) {
		this.poDate = poDate;
	}

	public String getPoDiscountPercent() {
		return this.poDiscountPercent;
	}

	public void setPoDiscountPercent(String poDiscountPercent) {
		this.poDiscountPercent = poDiscountPercent;
	}

	public String getPoNo() {
		return this.poNo;
	}

	public void setPoNo(String poNo) {
		this.poNo = poNo;
	}

	public String getPoSeries() {
		return this.poSeries;
	}

	public void setPoSeries(String poSeries) {
		this.poSeries = poSeries;
	}

	public String getPoType() {
		return this.poType;
	}

	public void setPoType(String poType) {
		this.poType = poType;
	}

	public String getPrNo() {
		return this.prNo;
	}

	public void setPrNo(String prNo) {
		this.prNo = prNo;
	}

	public String getRefPrLineSeq() {
		return this.refPrLineSeq;
	}

	public void setRefPrLineSeq(String refPrLineSeq) {
		this.refPrLineSeq = refPrLineSeq;
	}

	public String getSapCompanyCode() {
		return this.sapCompanyCode;
	}

	public void setSapCompanyCode(String sapCompanyCode) {
		this.sapCompanyCode = sapCompanyCode;
	}

	public String getSapPlantCode() {
		return this.sapPlantCode;
	}

	public void setSapPlantCode(String sapPlantCode) {
		this.sapPlantCode = sapPlantCode;
	}

	public BigDecimal getSeqNo() {
		return this.seqNo;
	}

	public void setSeqNo(BigDecimal seqNo) {
		this.seqNo = seqNo;
	}

	public String getSyncCreatedby() {
		return this.syncCreatedby;
	}

	public void setSyncCreatedby(String syncCreatedby) {
		this.syncCreatedby = syncCreatedby;
	}

	public Date getSyncCreatedon() {
		return this.syncCreatedon;
	}

	public void setSyncCreatedon(Date syncCreatedon) {
		this.syncCreatedon = syncCreatedon;
	}

	public String getSyncUpdatedby() {
		return this.syncUpdatedby;
	}

	public void setSyncUpdatedby(String syncUpdatedby) {
		this.syncUpdatedby = syncUpdatedby;
	}

	public Date getSyncUpdatedon() {
		return this.syncUpdatedon;
	}

	public void setSyncUpdatedon(Date syncUpdatedon) {
		this.syncUpdatedon = syncUpdatedon;
	}

	public String getUnitNumber() {
		return this.unitNumber;
	}

	public void setUnitNumber(String unitNumber) {
		this.unitNumber = unitNumber;
	}

	public String getUpdatedBy() {
		return this.updatedBy;
	}

	public void setUpdatedBy(String updatedBy) {
		this.updatedBy = updatedBy;
	}

	public String getUpdatedOn() {
		return this.updatedOn;
	}

	public void setUpdatedOn(String updatedOn) {
		this.updatedOn = updatedOn;
	}

	public String getVatAmountLc() {
		return this.vatAmountLc;
	}

	public void setVatAmountLc(String vatAmountLc) {
		this.vatAmountLc = vatAmountLc;
	}

	public String getVatBaseAmountLc() {
		return this.vatBaseAmountLc;
	}

	public void setVatBaseAmountLc(String vatBaseAmountLc) {
		this.vatBaseAmountLc = vatBaseAmountLc;
	}

	public String getVatPercent() {
		return this.vatPercent;
	}

	public void setVatPercent(String vatPercent) {
		this.vatPercent = vatPercent;
	}

}